package game.actor
{
	import engine.core.*;
	import engine.graphics.away3d.*;
	import engine.loaders.*;
	import engine.math.*;
	import game.core.*;
	import away3d.animators.skeleton.*;
	
	public class RxCharacterModels
	{
		private var m_actor:RxActor;
		private var m_models:Vector.<RxLoader3D>;
		private var m_sequence:RxSequence;
		private var m_partsAssembler:RxCharacterPartsAssembler;
		private var m_callback:RxCallback;
		public static const SLOT_INVALID:uint = 0;
		public static const SLOT_MAIN:uint = 0;
		public static const SLOT_LEFT_HAND:uint = 1;
		public static const SLOT_RIGHT_HAND:uint = 2;
		public static const SLOT_LEFT_ARM:uint = 3;
		public static const SLOT_BACK:uint = 4;
		public static const NUM_MODELS_SLOTS:uint = 5;
		
		public function RxCharacterModels(actor:RxActor)
		{
			var i:int = 0;
			this.m_actor = actor;
			this.m_models = new Vector.<RxLoader3D>(NUM_MODELS_SLOTS, true);
			i = 0;
			while (i < this.m_models.length)
			{
				
				this.m_models[i] = null;
				i++;
			}
			this.m_sequence = new RxSequence(this.m_actor);
			this.m_partsAssembler = null;
		}
		
		public function GetModel(param1:uint) : RxLoader3D
		{
			return param1 < this.m_models.length ? (this.m_models[param1]) : (null);
		}
		
		public function UpdateAttachments(param1:RxVector4, param2:Number) : void
		{
			/*
			var _loc_4:RxMaterial = null;
			var _loc_5:RxLoader3D = null;
			var _loc_6:RxLoader3D = null;
			var _loc_7:RxLoader3D = null;
			var _loc_8:RxLoader3D = null;
			var _loc_9:Vector.<JointPose> = null;
			var _loc_10:uint = 0;
			var _loc_11:uint = 0;
			var _loc_12:RxMatrix4x4 = null;
			var _loc_3:* = this.m_models[SLOT_MAIN];
			if (_loc_3 != null)
			{
				_loc_4 = RxMaterial(_loc_3.mesh.material);
				if (_loc_4 != null)
				{
					_loc_4.SetColor(param1);
				}
				if (_loc_3.globalPose != null)
				{
					_loc_5 = this.m_models[SLOT_LEFT_HAND];
					_loc_6 = this.m_models[SLOT_RIGHT_HAND];
					_loc_7 = this.m_models[SLOT_LEFT_ARM];
					_loc_8 = this.m_models[SLOT_BACK];
					_loc_9 = _loc_3.globalPose.jointPoses;
					_loc_10 = _loc_9.length;
					_loc_12 = RxMatrix4x4.PoolAlloc();
					if (_loc_5 != null)
					{
						_loc_11 = _loc_3.GetJointIndex(RxLoader3D.JOINT_L_HAND);
						if (_loc_11 < _loc_10)
						{
							_loc_9[_loc_11].rotTrans.ConvertToMatrix4x4(_loc_12);
							_loc_5.transform = _loc_12;
							_loc_5.scale(param2);
						}
					}
					if (_loc_6 != null)
					{
						_loc_11 = _loc_3.GetJointIndex(RxLoader3D.JOINT_R_HAND);
						if (_loc_11 < _loc_10)
						{
							_loc_9[_loc_11].rotTrans.ConvertToMatrix4x4(_loc_12);
							_loc_6.transform = _loc_12;
							_loc_6.scale(param2);
						}
					}
					if (_loc_7 != null)
					{
						_loc_11 = _loc_3.GetJointIndex(RxLoader3D.JOINT_L_ARM);
						if (_loc_11 < _loc_10)
						{
							_loc_9[_loc_11].rotTrans.ConvertToMatrix4x4(_loc_12);
							_loc_7.transform = _loc_12;
							_loc_7.scale(param2);
						}
					}
					if (_loc_8 != null)
					{
						_loc_11 = _loc_3.GetJointIndex(RxLoader3D.JOINT_BACK);
						if (_loc_11 < _loc_10)
						{
							_loc_9[_loc_11].rotTrans.ConvertToMatrix4x4(_loc_12);
							_loc_8.transform = _loc_12;
							_loc_8.scale(param2);
						}
					}
					RxMatrix4x4.PoolFree(_loc_12);
					_loc_12 = null;
				}
			}*/
		}
	}
}